@extends('wap.layouts.master')
@section('title','注册')

@section('content')

<div class="aw-main aw-common-user" id="Form-reg">
	<!--表单-开始-->
	<ul class="aw-assest-form aw-bg-fff aw-mt30">
		<li class="aw-form-li aw-pl10">
			<div class="aw-conter">
				<input type="text" placeholder="请输入手机号" class="aw-text-left" id="phone" name="phone" v-model="form.phone" :value="form.phone">
			</div>
		</li>
		<li class="aw-form-li aw-pl10">
			<div class="aw-conter">
				<input type="password" placeholder="请输入密码" class="aw-text-left" id="pwd" name="pwd" v-model="form.pwd" :value="form.pwd">
			</div>
		</li>
		<li class="aw-form-li aw-pl10 aw-pr130">
			<div class="aw-conter">
				<input type="text" placeholder="请输入手机验证码" class="aw-text-left" id="code" name="code" v-model="form.code" :value="form.code">
			</div>
			<div class="aw-right aw-right-code">
				<input onclick="Send_Code(this,'#Vue-body')" type="button" value="获取验证码" class="aw-assest-btn aw-btn-radius aw-btn-bgcolor-lanse aw-padding0">
			</div>
		</li>
	</ul>
	<div class="aw-common-btn aw-mt20"><a v-on:click="Click_Reg()" href="javascript:;" class="aw-assest-btn aw-btn-radius aw-btn-bgcolor-lvse">注册</a></div>
	<!--表单-结束-->
</div>

@section('pagejs')
@parent
<script type="text/javascript">
var Get_form={phone:'',pwd:'',code:''}
var AD_reg={
	api:'/api/user/reg',
	form_data:Get_form,
	tips:'注册成功',
}
vm=new Vue({
	el:'#Vue-body',
	data:{
		form:Get_form
	},methods:{
		Click_Reg:function(){
			console.log(this.data)
			Form_Verification('#Vue-body',this.form,'code',function(ver_code){
				if(ver_code==1){
					postData(AD_reg,function(ajax_data){
						id=ajax_data.uid;
						Get_User_Info(id,'/wap/common/perfect_info')
					})
				}
			})
		}
	}
})
</script>
@endsection

@endsection

